package org.tea.infrastructure.ipc;

import org.tea.application.ipc.BaseIpcMessage;

/**
 * @author lxh
 */
public class RedisIPCMessage<T>
        implements BaseIpcMessage<T> {

    private final String code;

    private final T data;

    public RedisIPCMessage(String code, T data) {
        this.code = code;
        this.data = data;
    }

    @Override
    public String code() {
        return this.code;
    }

    @Override
    public T extraData() {
        return this.data;
    }
}
